import request from '@/utils/request'
import qs from 'qs'



// 01、一级栏目总数量近6个月数据统计
export function topLevelChannelNumChangeTrend(data) {
  return request({
    url: '/infoUpdate/topLevelChannelNumChangeTrend',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 02、子栏目总数量近6个月数据统计
export function subChannelNumChangeTrend(data) {
  return request({
    url: '/infoUpdate/subChannelNumChangeTrend',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 03、文章总数量近6个月数据统计    只统计发布状态的文章
export function totalArticleNumChangeTrend(data) {
  return request({
    url: '/infoUpdate/totalArticleNumChangeTrend',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    data: qs.stringify(data)
  })
}

// 04、文章更新数量近6个月数据统计    只统计发布状态的文章
export function newArticleNumChangeTrend(data) {
  return request({
    url: '/infoUpdate/newArticleNumChangeTrend',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    data: qs.stringify(data)
  })
}

//  05、文章详情列表
export function listArticleDetail(data) {
  return request({
    url: '/infoUpdate/articleList',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    data: qs.stringify(data)
  })
}

//  02、按网站栏目统计-汇总 旧
export function countNumForChannels(data) {
  return request({
    url: '/statistics/countNumForChannels',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}


// 07、按文章作者统计-汇总 旧
export function countNumByAuthor(data) {
  return request({
    url: '/statistics/countNumByAuthor/total',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
// 11、按投稿部门统计-汇总旧
export function countNumByDept(data) {
  return request({
    url: '/statistics/countNumByDept/total',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}

// 14、 按投稿账号统计-汇总  旧
export function countNumByTg(data) {
  return request({
    url: '/statistics/countNumByTg/total',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}


//   10、省公司网站采用信息统计表  旧
export function sgsUsedInfoCount(data) {
  return request({
    url: '/statistics/sgsUsedInfoCount',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}

//  15、文章阅读量-网站近一年每月阅读量趋势图
export function yearRead(data) {
  return request({
    url: '/statistics/hit/year',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
//  16、文章阅读量-导出网站近一年每月阅读量趋势图
export function yearReadExport(data) {
  return request({
    url: '/statistics/hit/year/export',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
//  17、文章阅读量-各单位新闻阅读数量月度统计
export function depRead(data) {
  return request({
    url: '/statistics/hit/list',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
//  18、文章阅读量-导出各单位新闻阅读数量月度统计
export function depReadExport(data) {
  return request({
    url: '/statistics/hit/list/export',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
//  19、文章阅读量-阅读量不足提示   固定栏目
export function readAlert(data) {
  return request({
    url: '/statistics/hit/alert',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}
//   20、文章阅读量-导出首页栏目七日内新闻阅读数量统计  固定栏目
export function readAlertExport(data) {
  return request({
    url: '/statistics/hit/alert/export',
    headers: { 'content-type': 'application/x-www-form-urlencoded' },
    method: 'POST',
    params: data
  })
}



